<template>
  <a-card :bordered="false" type="inner" :body-style="{ padding: '0px' }"
    style="margin-bottom: 24px; box-shadow: none;">

    <!-- 终审决策表单 -->
    <div class="audit-form">
      <a-form :model="auditForm" :label-col="{ span: 2 }" :wrapper-col="{ span: 22 }">
        <a-form-item label="终审结果" name="state" :rules="[{ required: true, message: '请选择终审结果' }]">
          <a-radio-group v-model:value="auditForm.state" @change="handleFormChange">
            <a-radio value="AUDIT_SUCCESS">通过</a-radio>
            <a-radio value="AUDIT_FAILED">拒绝</a-radio>
          </a-radio-group>
        </a-form-item>
      </a-form>
    </div>
  </a-card>
</template>

<script setup lang="ts">
import { reactive, defineEmits } from 'vue';

// 定义事件
const emit = defineEmits(['update-audit-form']);

// 终审表单数据
const auditForm = reactive({
  state: 'AUDIT_SUCCESS'
});


// 监听表单变化
const handleFormChange = () => {
  emit('update-audit-form', auditForm);
};

// 暴露表单数据给父组件
defineExpose({
  auditForm,
  handleFormChange
});
</script>

<style scoped>
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-form h4 {
  margin-bottom: 16px;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
}
</style>
